#region License Revision: 0 Last Revised: 6/18/2008 11:00 AM
/******************************************************************************
Copyright (c) Microsoft Corporation.  All rights reserved.


This file is licensed under the Microsoft Public License (Ms-PL). A copy of the Ms-PL should accompany this file. 
If it does not, you can obtain a copy from: 

http://www.microsoft.com/resources/sharedsource/licensingbasics/publiclicense.mspx
******************************************************************************/
#endregion // License
using System;
using System.Windows.Browser;
using System.Diagnostics;
using ScriptInterop;

namespace VIEWS // Virtual Earth Wrapper
{

	/// <summary>A single "what" result returned from a VEMap.Find Method search.</summary>
	public class VEFindResult : JSObject
	{
		/// <summary>String holding JavaScript class name</summary>
		private static string thisClass = "VEFindResult";

		/// <summary>Get the JavaScript class name</summary>
		/// <returns type="String">The class name used in JavaScript </returns>		
		public override string ClassName
		{
			get { return thisClass; }
		}

		/// <summary>Construct a C# wrapper from a ScriptObject</summary>
		/// <param name="so">A ScriptObjet from JScript.</param>
		public VEFindResult(ScriptObject so) : base(so) { }

		/// <summary>Construct an empty C# wrapper, the ScriptObject MUST be set separately</summary>
		public VEFindResult() {  }

		/// <summary name="Description">The description of the found result.</summary>		
		public string Description
		{
			get { return GetProperty<string>("Description"); }
			set { SetProperty("Description", value); }
		}
		/// <summary name="IsSponsored">A Boolean value that indicates whether the found result is a paid advertisement.</summary>  
		public bool IsSponsored
		{
			get { return GetProperty<bool>("IsSponsored"); }
			set { SetProperty("IsSponsored", value); }
		}
		/// <summary name="LatLong">A VELatLong Class object that represents the location of the found result.</summary>
		public VELatLong LatLong
		{
			get { var so = GetProperty<ScriptObject>("LatLong"); return new VELatLong(so); }
			set { SetProperty("LatLong", (ScriptObject)value); }
		}
		/// <summary name="Name">The name of the found result.</summary>
		public string Name
		{
			get { return GetProperty<string>("Name"); }
			set { SetProperty("Name", value); }
		}
		/// <summary name="Phone">The telephone number of the found result. </summary>c fgvnjgt ngb              
		public string Phone
		{
			get { return GetProperty<string>("Phone"); }
			set { SetProperty("Phone", value); }
		}
		/// <summary name="FindType">Gets or sets the VEFindType Enumeration that represents the type of Find that was performed.</summary>  
		public string FindType
		{
			get { return GetProperty<string>("FindType"); }
			set { SetProperty("FindType", value); }
		}
		/// <summary name="Shape">A reference to the VEShape Class object corresponding to this FindResult object. The VEShape object represents the result's pushpin displayed on the map.</summary>
		public VEShape Shape
		{
			get { var so = GetProperty<ScriptObject>("Shape"); return VEShape.GetShapeObject(so); }
			set { SetProperty("Shape", (ScriptObject)value); }
		}
	}

}